﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;

namespace Home.Domain.Entities.Secondary.Mapping
{
    public class TPCCategoryMap<TTPCCategory> : EntityTypeConfiguration<TTPCCategory> where TTPCCategory : TPCCategory
    {
        public TPCCategoryMap()
        {
            HasKey(t => t.Id);
            //属性
            Property(t => t.Title)
                .IsRequired()
                .HasMaxLength(32);
            Property(t => t.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
        }
    }
}
